package com.vaadin.lab1;

import java.awt.Font;
import java.awt.FontMetrics;

import javax.swing.JLabel;

public class FontSize {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Font font = new Font("Avenir LT Com 35 Light", Font.PLAIN, 8);
		
		JLabel jLabel = new JLabel();
		jLabel.setSize(170, 10);
		FontMetrics fontMetrics = jLabel.getFontMetrics(font);
		int i = fontMetrics.stringWidth("MMMMMMMMMMMMMMMMMMMMMMMM");
		
		System.out.println(i);
	}

}
